<!-- 必须全局拥有唯一的id -->
<div id="WfTaskpoolList">
  <yu-panel title="项目池配置">
    <template slot="right">
      <yu-toolBar>
        <el-button @click="openCreateFn">新增</el-button>
        <el-button @click="openEditFn">修改</el-button>
        <el-button @click="deleteFn">删除</el-button>
        <el-button @click="openDutyFn">关联岗位设置</el-button>
      </yu-toolBar>
    </template>
    <yu-xform v-model="formdata" related-table-name="WfTaskPoolList" form-type="search" label-width="110px">
      <yu-xform-group :column="4">
        <yu-xform-item label="项目池编号" placeholder="项目池编号" ctype="input" name="poolId"></yu-xform-item>
        <yu-xform-item label="项目池名称" placeholder="项目池名称" ctype="input" name="poolName"></yu-xform-item>
      </yu-xform-group>
    </yu-xform>
    <el-table-x ref="WfTaskPoolList" :max-height="height" :data-url="urls.dataUrl" :base-params="dataParams"
      :table-columns="tableColumns"></el-table-x>
  </yu-panel>

  <el-dialog-x :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="750px">
    <el-form-x ref="WfTaskPoolForm" :group-fields="NewFields" :disabled="formDisabled" label-width="110px"></el-form-x>
    <div slot="footer" align="center">
      <el-button type="primary" @click="saveCreateFn()">确 定</el-button>
      <el-button @click="dialogFormVisible = false">取 消</el-button>
    </div>
  </el-dialog-x>

  <el-dialog-x :title="textMap[dialogStatus]" :visible.sync="modifydialogFormVisible" width="750px">
    <el-form-x ref="reform" :group-fields="updateFields" label-width="110px"></el-form-x>
    <div slot="footer" align="center">
      <el-button type="primary" @click="saveEditFn()">确 定</el-button>
      <el-button @click="modifydialogFormVisible = false">取 消</el-button>
    </div>
  </el-dialog-x>
  <!--关联岗位设置-->
  <el-dialog-x :title="DutyTitle" :visible.sync="dialogVisibleDuty" width="750px" @close="beforeCloseDuty">
    <el-card class="box-card">
      <el-tag v-for="tag in checkDutyList" :key="tag.dutyId" type="success" closable @close="TagClose(tag)">
        {{tag.dutyName}}
      </el-tag>
    </el-card>
    <el-table ref="dutyTable" :data="dutyMembers" @selection-change="dutySelect" @row-click="rowClick" border>
      <el-table-column type="selection" width="40"></el-table-column>
      <el-table-column prop="dutyId" label="岗位码" resizable>
      </el-table-column>
      <el-table-column prop="dutyName" label="岗位名称" resizable>
      </el-table-column>
    </el-table>
    <div slot="footer" align="center">
      <el-button type="primary" @click="saveDuty">确 定</el-button>
      <el-button @click="beforeCloseDuty">取 消</el-button>
    </div>
  </el-dialog-x>
</div>